/*
 * @Author: PC9527\Jack sophia2152@qq.com
 * @Date: 2023-08-07 15:04:09
 * @LastEditors: PC9527\Jack sophia2152@qq.com
 * @LastEditTime: 2023-08-10 16:23:05
 * @Description:
 */
import { BasicPageParams, BasicFetchResult } from '../../model/baseModel';
// 搜索
export type RoleListParams = {
  role_name?: string;
  status?: number;
};

// 创建修改角色
export type RoleParams = {
  id?: string;
  role_name: string;
  status: number;
  checked_menus?: Array<string>;
};

export type RolePageParams = BasicPageParams & RoleListParams;

// 角色列表
export interface RoleListItem {
  id: number;
  role_name: string;
  status: number;
  rules_name?: string;
}

// 下拉角色列表
export interface RoleSelectListItem {
  id: string;
  role_name: string;
}

// 查询权限列表
export interface RoleList {
  id: number;
  pid: number;
  title: string;
  expand?: boolean;
}

// export interface RoleInfo {
//   id: number;
//   pid: number;
//   title: string;
//   children?: Array<string>;
//   expand?: boolean;
// }

export type RolePageListGetResultModel = BasicFetchResult<RoleListItem>;

// export type RoleInfoGetResultModel = BasicFetchResult<RoleInfo>;

export type RoleListGetResultModel = RoleList[];

// 下拉列表
export type RoleSelectListGetResultModel = BasicFetchResult<RoleSelectListItem>;
